require 'rubygems'
require 'rake'

begin
  require 'jeweler'
  Jeweler::Tasks.new do |gem|
    gem.name = "spiderman"
    gem.summary = %Q{A crawler written in Ruby}
    gem.description = %Q{A crawler written in Ruby}
    gem.email = "devteam@bangthetable.com", "deepali@bangthetable.com"
    gem.homepage = "https://github.com/bangthetable/spiderman/"
    gem.authors = ["BangTheTable", "Deepali Kherudkar"]
    gem.add_development_dependency "nokogiri"
    gem.add_development_dependency "mechanize"
  end
rescue LoadError
  puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
end

task :test => :check_dependencies

require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
  if File.exist?('VERSION')
    version = File.read('VERSION')
  else
    version = ""
  end

  rdoc.rdoc_dir = 'rdoc'
  rdoc.title = "spiderman #{version}"
  rdoc.rdoc_files.include('README*')
  rdoc.rdoc_files.include('lib/**/*.rb')
end

